import com.itheima.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserApp {
    public static void main(String[] args) {
        ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");
        UserService ser1 = applicationContext.getBean("ser1", UserService.class);
        UserService ser2= applicationContext.getBean("ser2", UserService.class);
        UserService ser3 = applicationContext.getBean("ser3", UserService.class);
        System.out.println(ser1);
        System.out.println(ser2);
        System.out.println(ser3);
        ser1.save();
        ser2.save();
        ser3.save();
    }
}
